package com.freshcity.page.common
{
	import com.freshcity.component.container.Component;
	import com.freshcity.icons.OnlineIconWin;
	
	import flash.display.DisplayObjectContainer;
	import flash.events.Event;
	
	public class OnlineIcon extends Component
	{
		private var back:OnlineIconWin;
		
		public function OnlineIcon(parent:DisplayObjectContainer=null, xpos:Number=0, ypos:Number=0)
		{
			super(parent, xpos, ypos);
		}
		
		override protected function addChildren():void
		{
			super.addChildren();
			back = new OnlineIconWin();
			back.visible = false;
			addChild(back);
		}
		
		public function set online(flag:Boolean):void
		{
			if(flag){
				back.visible = true;
				this.toolTipData = "在线";
			}else{
				back.visible = false;
				this.toolTipData = null;
			}
		}
		
		override public function destroy():void
		{
			// TODO Auto Generated method stub
			super.destroy();
		}
		
		override public function show(event:Event=null):void
		{
			// TODO Auto Generated method stub
			super.show(event);
		}
		
	}
}